package reseauserv;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

import javax.imageio.IIOException;

public class AccepterConnexion implements Runnable {

	private ServerSocket socketserver = null;
	

	public Thread t1;

	public AccepterConnexion(ServerSocket ss) {
		socketserver = ss;
	}

	public void run() {

		try {
			while (true) {
				Socket socket1 = socketserver.accept();
				t1 = new Thread(new DiscussionServeurClient(socket1));
				t1.start();
				
			}
		} catch (IOException e) {
			System.err.println("Erreur serveur");
		}

	}
}
